
/* 登录接口函数 */
import request from './ajax.ts'
export function reqLogin(data) {
    return request.post('/api/v1/user/login', data)
}

export function reqReLogin(params) {
    return request({
        url: '/api/v1/user/info',
        method: 'get',
        headers: {
            'Authorization': 'Bearer ' + params
        }
    })
}

export function getModelList(params) {
    return request({
        url: '/api/v1/module/list',
        method: 'get',
        headers: {
            'Authorization': 'Bearer ' + params
        }
    })
}
export function getModelDetail(params, id) {
    return request({
        url: '/api/v1/module/detail',
        method: 'get',
        headers: {
            'Authorization': 'Bearer ' + params
        },
        params: {
            id: id
        }
    })
}
export function createTask(token, params) {
    console.log('token', token);
    console.log('params', params);
    return request({
        url: '/api/v1/job/generate',
        method: 'post',
        data: params,
        headers: {
            'Authorization': 'Bearer ' + token
        }
    })
}

export function searchArticleRepeat(params, token) {
    return request({
        url: '/api/v1/check/original',
        method: 'post',
        data: params,
        headers: {
            'Authorization': 'Bearer ' + token
        }
    })
}